package com.wt.admin.mapper.image;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wt.admin.domain.dto.image.ImageFeaturesDTO;
import com.wt.admin.domain.dto.image.ImageItemDTO;
import com.wt.admin.domain.entity.image.ImageFeaturesEntity;
import com.wt.admin.domain.entity.image.ImageItemEntity;
import com.wt.admin.domain.vo.image.ImageFeaturesVO;
import com.wt.admin.domain.vo.image.ImageItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ImageItemMapper extends BaseMapper<ImageItemEntity> {

    @Select("select count(*) from image_item where classification_id = #{id}")
    int findByCountImageClassificationId(@Param("id") Integer id);

    IPage<ImageItemVO> imageList(Page<ImageItemDTO> page, @Param("data") ImageItemDTO data);

    List<ImageItemEntity> listByClassificationId(Integer id);

    List<ImageItemVO> videoByImages(@Param("url") String videoUrl);

    void delVideoImage(@Param("list") List<String> data);
}
